//
//  PosterDetailView.m
//  项目1 CLCMovie
//
//  Created by huiwenjiaoyu on 15/7/25.
//  Copyright (c) 2015年 CLC. All rights reserved.
//

#import "PosterDetailView.h"
#import "UIViewExt.h"
#import "UIImageView+WebCache.h"


@implementation PosterDetailView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if(self)
    {
        
        
    }
    
    return self;
}

- (void)setHomemodal:(HomeModal *)homemodal
{
    _homemodal = homemodal;
    
    [self setNeedsLayout];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    
    _titleLabel.text = _homemodal.title;
    _yearLabel.text = _homemodal.year;
    _markLabel.text = [NSString stringWithFormat:@"评分 %.1f",_homemodal.mark];
    
    [_PhotoImageView sd_setImageWithURL:[NSURL URLWithString:[_homemodal.images valueForKey:@"large"]]];

    _StarView.mark = _homemodal.mark;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
